package com.aiguigu.sort;

public class QuickSort1 {
    public static void main(String[] args) {
        int arr[] = {10, 14, -1, 5, 6, 55, 47};
        int temp;
        int low = 0;
        int height = arr.length-1;
        temp = arr[low];
        while (low<height){

            while (low<height&&arr[height]>=temp){
                height-=1;
            }
            arr[low] = arr[height];
            while (low<height&& arr[low]<=temp){
                low=low+1;
            }
            arr[height] = arr[low];
        }
        arr[low] = temp;
        for (int i : arr) {
            System.out.print(i+" ");
        }
    }
}
